<script>
	var root_path = '<?php echo _SITE_ADMIN_URL_?>';
	var table = 'page_content';
	var field = 'slug';
	
	
</script>
<div class="container_12"> 
    <div class="module">
        <h2><span><?php echo $_title; ?></span></h2>
        <div class="module-body">
            <div style="margin-top:13px;">
                <?php
                if(isset($errMsg)){?>
                    <span class="notification"><?php echo $_MESSESGE[$errMsg];?></span>
                <?php }?>
			</div>
                        
            <form id="adminForm" name="admin_frm" action="" method="post" enctype="multipart/form-data">
				<p>
					<label>Slug</label>
					<div id="availability_info"></div>
					<input type="text" class="input-short check_availability" name="slug" value="<?php echo $result['slug'];?>" />
					<!--  <span class="notification-input ni-correct">This is correct, thanks!</span> -->
				</p>
				<p>
					<label>Title</label>
					<input type="text" class="input-short check_availability" name="title" value="<?php echo $result['title'];?>" />
					<!--  <span class="notification-input ni-correct">This is correct, thanks!</span> -->
				</p>
				<p>
					<label>Description</label>
					<?php $editor->editor('description', $result['description']) ;?>
				</p>	  
				<p>
					<label>Meta Title</label>
					<textarea rows="7" cols="90" class="input-short" id="meta_title" name="meta_title"><?php echo $result['meta_title'];?></textarea>
				</p>
				<p>
					<label>Meta Description</label>
					<?php $editor->editor('meta_description', $result['meta_description']) ;?>
				</p>
				<p>
					<label>Meta Keywords</label>
					<textarea rows="7" cols="90" class="input-short" id="meta_keywords" name="meta_keywords"><?php echo $result['meta_keywords'];?></textarea>
				</p>
				<p>
					<label>Image</label>
					<input type="file" name="page_image">
					Thumb Preview : <img src="<?php echo _SITE_URL_ . $_img_upload_path['page_content'].'thumb/'.$result['image']; ?>" /><br/>
				</p>
				<fieldset>
					<input type="hidden" class="input-short" name="id" value="<?php echo $result['id'];?>" />
					<input class="submit-green" type="submit" name="submit" value="Submit" /> 
					<input class="submit-gray" type="button" value="Cancel" onclick="javascript: window.location='<?php echo _SITE_ADMIN_URL_?>'+'content/news_mng.php';" />
				</fieldset>
			</form>
		</div> <!-- End .module-body -->
	</div>  <!-- End .module -->
</div>
<div style="clear:both;"></div>
<script type="text/javascript">
		
	$().ready(function() {
		$("#adminForm").validate({
			rules: {
				slug: "required",
				title: "required",
				description: "required"

				/*,meta_title: "required",
				meta_description: "required",
				meta_keywords: "required"*/
			},
			messages: {
				slug: "Please enter page slug",
				title: "Please enter page title",
				description: "Please enter page description"

				/*,meta_title: "Please enter page meta title",
				meta_description: "Please enter page meta description",
				meta_keywords: "Please enter page meta keywords"*/
			}
		});
	});
</script> 
<script type="text/javascript" src="<?php echo _ADMIN_JS_; ?>check_availability.js"></script>